﻿@using System.Web.Optimization
@using Ed.Web.Helpers
@model Ed.Entity.TSysRole
@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>雪绒花_角色系统管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" conte="conte" nt="IE=Edge" />
    @Styles.Render("~/Themes/default/css/cp.globle.min1.css")
    @Scripts.Render("~/Themes/default/js/cp.globle.min1.js")
    <!--去除顶层加载中 14-10-17 By 唐有炜-->
    <script type="text/javascript">
        //=============================================================
        //去除顶层加载中
        $(document).ready(function () {
            //去除加载中
            if (undefined != top.dialog.list["show_loading"]) {
                top.dialog.list["show_loading"].close().remove();
                //showTopMsg("页面加载成功！", "温馨提示", "Success");
            }
        });
        //=====================================================================
    </script>
    <!--my97DatePicker-->
    <script src="/Themes/default/lib/my97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <!--省市数据-->
    <script src="/Themes/default/base/js/city.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            validate_form();
        });


        //表单验证
        function validate_form() {
            //表单验证
            $("#sysrole_form").validate({
                invalidHandler: function (e, validator) {
                    var msg = "有 " + validator.numberOfInvalids() + " 项填写有误，请检查！";
                    $("#msgprint").html(msg).show().focus();
                    setTimeout(function () {
                        $("#msgprint").fadeOut(500);
                        //如果动画结束则删除节点
                        if (!$("#msgprint").is(":animated")) {
                            $("#msgprint").hide();
                        }
                    }, 1000);
                },
                focusInvalid: false,
                errorPlacement: function (error, element) {
                    var errorMsg = error[0].innerHTML;
                    var elementName = element[0].name;
                    $("#" + elementName).formtip(errorMsg);
                    $("#" + elementName).attr("placeholder", errorMsg);
                },
                success: function (element) {
                    var elem = $(element)[0].htmlFor;
                    $("#" + elem).poshytip('disable');
                    $("#" + elem).poshytip('destroy');
                    $("#" + elem).removeClass("error").addClass("success");
                }
            });
        }

        //表单验证方法，供父窗口调用
        function form_valid() {
            if ($("#sysrole_form").valid()) {
                //        $('#formTab li:eq(1) a').tab("show");
                //        //修复验证bug
                //        $("#con_name").focus();
                //        if ($("#con_name").val() == "") {
                //            $("#con_name").formtip("主联系人不能为空！");
                //            return false;
                //        } else {
                //            return true;
                //  }
                return true;
            } else {
                return false;
            }

        }
    </script>
</head>
<body>
    <form id="sysrole_form" name="sysrole_form">
    <!--id-->
    @Html.HiddenFor(model => model.Id)
    <!--表单错误提示区-->
    <div tabindex="-1" id="msgprint" class="warning" style="position: fixed; width: 90%;
        display: none;">
        您的表单包含错误，请检查！</div>
    <div class="tab-content">
        <ul class="nav nav-tabs" id="formTab">
            <li class="active"><a href="#tab-info" data-toggle="tab">角色信息管理页面</a></li>
        </ul>
        <div class="tab-pane active" id="tab-info">
            <div style="height: 15px;">
            </div>
            <table width="800" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect">
                <tbody>
                    <tr>
                        <th>
                            <span class="must">*</span>角色名称：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.RoleName, new { @class = "form-control", @style = "width: 200px; ", @placeholder = "角色名" })
                        </td>
                        <th>
                            <span class="must">*</span>角色类型：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.RoleType, new { @class = "form-control required number", @style = "width: 200px; ", @placeholder = "" })
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span class="must">*</span>是否内置：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.RoleIssys, new { @class = "form-control", @style = "width: 200px; ", @placeholder = "" })
                        </td>
                        <th>
                            角色排序：
                        </th>
                        <td>
                            @Html.TextBoxFor(model => model.RoleOrder, new { @class = "form-control number", @style = "width: 200px; ", @placeholder = "" })
                        </td>
                    </tr>
                    <tr>
                        <th>
                            角色描述：
                        </th>
                        <td colspan="3">
                            @Html.TextAreaFor(model => model.RoleDesc, new { @class = "form-control", @style = "width:600px;height:70px;", @placeholder = "请输入当前角色描述信息" })
                        </td>
                </tbody>
            </table>
        </div>
    </div>
    </form>
</body>
